<div class="fadeIn">
  <br>
  <ol class="breadcrumb">
      <li class="active"><span class="glyphicon glyphicon-home" style="color:#23527c"></span>&nbsp;<mainpage></mainpage></li>
      <li class="active">监控工作台 / 环境监控 / oracle监控</li>
  </ol>
  <div class="lineTitle" style="border-left:none;"> <span>oracle信息：</span> </div>
  <div class="borderGreen" >
    <div class="bg-info">
      <div class="row">
        <div class="col-sm-9">
        <div class="row line32 marL15" ng-repeat='item in result.racinfo'>
            <span class="col-sm-4">oracle版本：{{item.ver}}</span>
            <span class="col-sm-4">节点数{{item.nodes}}</span>
            <span class="col-sm-4">SCAN-IP:{{item.acanip}}</span>
            <span class="col-sm-4">集群健康度：{{item.status}}</span>
            <span class="col-sm-4">告警数：{{item.alarmCount}}</span>
            <span class="col-sm-4">责任人：{{item.user}}</span>
            <span class="col-sm-4">手机号码：{{item.phone}}</span>
            <span class="col-sm-4">邮箱：{{item.email}}</span>
       </div>
       <!-- <div class="row line32 marL15">
            <span class="col-sm-3">集群健康度:{{status}}</span>
            <span class="col-sm-3">集群分片数:{{}}</span>
            <span class="col-sm-3">责任人:{{user}}</span>
            
       </div>
       <div class="row line32 marL15 padB10">
            <span class="col-sm-6">手机号码:{{phone}}</span>
            <span class="col-sm-6">邮箱:{{email}}</span>
            
       </div> -->
       </div>
        <div class="col-sm-3" style="margin-top:30px;"><button class="btn btn-primary btn-sm" ng-click='edit()' data-toggle="modal" data-target="#add1"><i class="icon-leaf"></i>监控配置</button></div>
      </div>
       
    </div>
   </div>
   <div class="lineTitle"> <span>RAC集群资源状态：</span> </div>
   <div class="borderGreen">
       <table class="table table-bordered table-hover table-striped bg-info text-center" style="margin:0">
           <tr>
               <td>序号</td>
               <td>名称</td>
               <td>类型</td>
               <td>目标</td>
               <td>当前状态</td>
               <td>所在主机</td>
           </tr>
           <tr ng-repeat='item in result.racstatus'>
               <td>{{$index+1}}</td>
               <td>{{item.racName}}</td>
               <td>{{item.racType}}</td>
               <td>{{item.racAim}}</td>
               <td>{{item.racStutas}}</td>
               <td>{{item.racFrom}}</td>
           </tr>
       </table>
   </div>
   <div class="lineTitle"> <span>表空间使用状态：</span> </div>
   <div class="borderGreen">
       <table class="table table-bordered table-hover table-striped bg-info text-center" style="margin:0">
           <tr>
               <td>序号</td>
               <td>表空间名称</td>
               <td>大小（G）</td>
               <td>已使用（G）</td>
               <td>使用率</td>
               <td>物理文件名</td>
           </tr>
           <tr ng-repeat='item in result.space'>
               <td>{{$index+1}}</td>
               <td>{{item.tabName}}</td>
               <td>{{item.tabSize}}</td>
               <td>{{item.tabUseSize}}</td>
               <td>{{item.tabUsage}}</td>
               <td>{{item.tabFileName}}</td>
           </tr>
       </table>
   </div>
   <div class="lineTitle"> <span>后台sql运行监控：</span> </div>
   <div class="borderGreen">
   <table class="table table-bordered table-hover table-striped bg-info text-center" style="margin:0">
           <tr>
               <td>序号</td>
               <td>sql语句</td>
               <td>状态</td>
               <td>加载时间</td>
               <td>执行时间(秒)</td>
               <td>消耗cpu</td>
               <td>sql地址</td>
               <td>数据库用户名</td>
               <td>操作系统用户名</td>
               <td>终端名</td>
               <td>SID</td>
               <td>SERIAL#</td>
               <td>进程ID</td>
           </tr>
           <tr ng-repeat='item in result.sql'>
               <td>{{$index+1}}</td>
               <td>{{item.sqlContent}}</td>
               <td>{{item.sqlStatus}}</td>
               <td>{{item.sqlLoadTime}}</td>
               <td>{{item.sqlExecuteTime}}</td>
               <td>{{item.sqlConsumeCpu}}</td>
               <td>{{item.sqlAddress}}</td>
               <td>{{item.sqlDatebaseName}}</td>
               <td>{{item.sqlOsName}}</td>
               <td>{{item.sqlTerminalName}}</td>
               <td>{{item.sqlSid}}</td>
               <td>{{item.sqlSerial}}</td>
               <td>{{item.sqlThredId}}</td>
           </tr>
       </table>
   </div>
</div>

<!--添加程序弹窗-->
<div class="modal fade" id="add1" tabindex="-1" role="dialog" aria-labelledby="add1">
    <form name="form">
    <div class="modal-dialog" style="width:780px;" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" id="add11">oracle监控配置</h4>
            </div>
            <div class="modal-body">           
            <table class="table table-bordered table-striped table-hover bg-info">
                <thead>
                <tr class="bg-info"><td colspan="7">预警接收人员配置：</td></tr>
                <tr>
                    <td>序号</td>
                    <td>预警接收人</td>
                    <td>手机</td>
                    <td>邮箱</td>
                    <td>人员类型</td>
                    <td>接收预警等级</td>
                    <td ng-style='addstyle'>操作</td>
                </tr>
                </thead>
                <tbody>
                <tr ng-repeat='item in addData.alarmusers'>
                    <td>{{$index+1}}</td>
                    <td>
                    <select class="form-control line3" class="receiveUser" 
                    ng-model='item.rceId' 
                    ng-disabled='isDisabled'
                    ng-change='changeRecUser($index)'
                    ng-options='i.rceId as i.receiveUser for i in alarmusers'></select>
                    </td>
                    <td><input type="text" class="form-control line3" ng-model='item.phone'></td>
                    <td><input type="text" class="form-control line3" ng-model='item.email'></td>
                    <td><select class="form-control line3" style="width:70px;" ng-model='item.userType'>
                    <option value="1">责任人</option>
                    <option value="0">关注人</option>
                    </select></td>
                    <td>
                        <label><input type="checkbox"                         
                        ng-model='item.recAlarmLevel1'
                        >1级</label>
                        <label class="marL10 marR10"><input type="checkbox"                       
                        ng-model='item.recAlarmLevel2'
                        >2级</label>
                        <label><input type="checkbox"                       
                        ng-model='item.recAlarmLevel3'
                        >3级</label>
                    </td>
                    <td ng-style='addstyle'><button class="btn btn-primary btn-sm" ng-click='delRecevier($index)'>删除</button></td>
                </tr>
                </tbody>
                
                <tfoot ng-style='addstyle'>
                 <tr><td> <a title='添加' class="glyphicon glyphicon-plus" ng-click='addRecevier()'></a></td></tr>
                </tfoot>
                
            </table>
            <table class="table table-bordered table-hover">
                <tr>
                    <td>序号</td>
                    <td>监控指标名称</td>
                    <td>阀值上限</td>
                    <td>阀值下限</td>
                    <td>监控说明</td>
                    <td>操作</td>
                </tr>
                <tr class="bg-info" ng-repeat='item in addData.indexnames'>
                    <td>{{$index+1}}</td>
                    <td>
                       <select  class="form-control line3"  
                        ng-disabled='isDisabled'
                        ng-model='item.keyId'
                        ng-options='i.keyId as i.keyNameCn for i in indexnames'
                        ></select>
                    </td>
                    <td><input type="text" class="form-control line3" ng-model='item.upperLimit'></td>
                    <td><input type="text" class="form-control line3" ng-model='item.lowerLimit'></td>
                    <td><input type="text" class="form-control line3" ng-model='item.remark'></td>
                    <td><a class="btn btn-sm btn-primary" ng-click='delIndex($index)'>删除</a></td>
                </tr>
                <tr>
                  <td>
                  <a title='添加' class="glyphicon glyphicon-plus" ng-click='addIndex()'></a></td>
                  <td></td>
                  <td></td>
                  <td></td>
                  <td></td>
                  <td></td>
                </tr>
            </table>        
        </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default btn-sm" data-dismiss="modal">取消</button>
                <button type="button" class="btn btn-primary btn-sm" ng-click='editSave()'>保存</button>
            </div>
        </div>
    </div>
    </form>
</div>
</div>
<!-- 加载框 -->
  <span class='loaded' ng-show='loaded'><img  src="img/load.gif"></span>
<!-- 加载框 完成-->




